package com.poetize.plus.controller.ui;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.poetize.plus.entity.dto.page.TimeLinePageDTO;
import com.poetize.plus.entity.vo.page.TimeLinePageVO;
import com.poetize.plus.service.TimeLineService;
import com.poetize.plus.utils.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.security.PermitAll;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zuosy
 * @created 2024/5/13 15:33
 */
@Tag(name = "时间线信息")
@RestController
@RequestMapping("/timeLine")
@RequiredArgsConstructor
public class TimeLineUiController {

    private final TimeLineService timeLineService;

    @PermitAll
    @GetMapping("/getPage")
    @Operation(summary = "展示系统分页数据")
    public R<Page<TimeLinePageVO>> getPage(TimeLinePageDTO timeLinePageDTO){
        return R.ok(timeLineService.getPage(timeLinePageDTO));
    }
}
